Computer-implemented method of arranging text items in a predefined order

ABSTRACT

A computer-implemented method of and a device, such as a base station for a headset, for arranging text items in a predefined order, comprising storing, in the memory of a peripheral device, a collection of multiple text items arranged in multiple sets of text items and in multiple groups of text items; storing a respective code item with a respective group of text items; and storing a sort key that has values that designate a predefined order of the text items in each set. The sort key is appended to the text items and comprises at least one character with a value within the Private Use range of the Unicode format.

Devices, such as for example base stations for headsets, are oftenprovided with a microprocessor or microcontroller capable of servingtheir main purpose such as establishing communication between a personalcomputer and a headset.

Such devices and other devices with a microprocessor or microcontrollerdedicated to a particular purpose are typically specifically configuredto that purpose and lack the processing resources in terms of CPU rateand memory space of e.g. a general purpose computer when it comes toprocessing resources allocated to functions of the device aside theparticular purpose of the device. Thus, for instance for serving a userinterface or man-machine-interface of the device there are relativelylimited processing resources available.

To this end it is often desired to provide an as intuitive andcomprehendible user interface as possible. This may involve providinginstructions and selectable options in a selectable language which inturn takes processing resources for text processing e.g. for presentingwords and names in alphabetic order. Presenting selectable text optionsin alphabetic order greatly improves the intuitiveness of the userinterface.

Especially, sorting of text items in alphabetical order is a complextask when several language are dealt with because the device needs tocomply with national or language-wise sorting rules which governs e.g.how words with national characters such as ‘æ’, ‘ø’ and ‘å’ in theDanish alphabet are to be dealt with.

Thus, in order to improve the user interface, more advanced textprocessing and/or sorting capabilities are needed at the lowest possiblecost in terms of CPU rate and memory space.

RELATED PRIOR ART

US 2008/0046824 A1 discloses a method for sorting two or more contactpersons held in a contact name data repository of a mobile device suchas a mobile phone. A sort component can sort the contacts according to aso-called display name reading which is based on the pronunciation ofthe display name in question so as to provide an intuitive sorting ofthe two or more contact persons. The method can operate on languageletters, characters, numbers and phonetic symbols as long as thecomputer/mobile device can recognize the letters, characters. The sortcomponent can employ a suitable encoding system or tool for sorting ofthe contact names for example based on Japanese Unicode characters.

U.S. Pat. No. 7,587,378 B2 discloses handheld computing devices such aswireless phones and PDAs that include a display to presenthuman-readable information. A rule data store contains a statement ofrules governing prescribed aspects of presenting data on the display. Aset of rules are used to manage the display of language variable data.The set of rules may possess knowledge about specific features of forexample Dutch such as the rule that the “ij” character comes before the“j” character in alphabetic order in Dutch. A rules engine returns thelanguage variable data appropriately alphabetically sorted to a callingprogram. The disclosed alphabetic sorting methodologies and devices arebased on normal Unicode mapping.

SUMMARY

There is provided a computer-implemented method of arranging text itemsin a predefined order, comprising storing, in the memory of a peripheraldevice, a collection of multiple text items arranged in multiple sets oftext items and in multiple groups of text items; and storing arespective code item with a respective group of text items. Furthercomprising storing a sort key that has values that designate apredefined order of the text items in each set; wherein the sort key isappended to the text items and comprises at least one character with avalue within the Private Use range of the Unicode format.

This is expedient especially for peripheral devices with limited datastorage capacity and limited data processing capacity. The sort key canbe used to store the text items in a way where they are readilyavailable for being sorted by a relatively simple sort algorithm topresent them in a sorted order which otherwise would require arelatively complex sort algorithm. The sort key and its values can beappended to the text items by a pre-processing step that may require arelatively complex sort algorithm and thus strong computational power tobring the text items into a desired order, e.g. alphabetic order, asdesignated by the values of the sort key. Such a pre-processing step maybe performed by a general purpose computer such as a personal computerrunning an operating system such as Microsoft Windows™ and using thesort programs available therein. Also as a part of the pre-processingstep, the sort key and its values are appended to the text items. Theresult of the pre-processing step can be in the form of a binary filethat is downloaded to the memory of the peripheral device.

Subsequent to the pre-processing step, the peripheral device can accessits memory and run the relatively simple sort algorithm with itsrelatively limited computational power to present the text items in theorder defined by the relatively complex sort algorithm.

The text items comprise characters conforming to the Unicode standardused in most computer systems. The values of the sort key are encoded tocomprise values taken from the so-called Private Use Area of the Unicodestandard. The Private Use Area of the Unicode standard comprises valuesin the hexadecimal range U+E000 to U+F8FF. The values of the sort keyare assigned such that they designate a desired sort order by ascendingor descending values. The values may be consecutive values. It is thevalues of the sort key that designate the sort order. The sort key maycomprise a single Unicode character or any multitude of Unicodecharacters. Likewise, the text items may each comprise one or anymultitude of Unicode characters.

In an embodiment, a peripheral device has a simple man-machine interfacewith a small display and a few buttons and requires a country dependentset-up, where a user is requested to enter his country of location andis presented on a display with a list of countries in his own languageof preference. According to the above method it is then possible topresent to the user the list of countries, in a selected language, in analphabetic order which may be different from the order in which the textitems are stored. This greatly improves interaction with the user, sincethe user has the items presented in an order he/she would expect; analphabetic order. Thereby, the interaction with the user can proceed ina faster way than that otherwise possible given the computational powerand memory resources of the peripheral device. It should be notedhowever, that other sort orders than an alphabetic sort order can beused.

The code item can comprise any country and/or language dependentinformation that can be read by the peripheral device to make it operateaccording to a property given by the code item. In an embodiment thecode item comprises country codes and/or telephone numbers for directinga telephone call or a text message according to the Short MessageService to a desired country and/or subscriber. The telephone calland/or text message may be performed and/or initiated automatically orsemi-automatically from the peripheral device. Since telephone calls andtext messages are charged by fees that generally are higher when theyare destined for other countries it is thus convenient to use alocal/national subscriber line for instance for product registrationservices or other services, such as for registering the peripheraldevice. The above-mentioned method makes it possible to selectnationality for instance for this purpose in a convenient way, wherecountry names can be sorted as a user would expect them to be sorted.This greatly improves the quality of the man-machine-interface of thedevice.

In some embodiments the peripheral device is a base station for aheadset that connects the headset to a general purpose computer. Thebase station may comprise a radio frequency transmitter/receiver forwireless communication with the headset and connects to the generalpurpose computer by a wired connection e.g. a Universal Serial Bus (USB)connection or a wireless connection e.g. a Bluetooth™ connection. Thecomputer-implemented method is executed as a programme run by amicroprocessor or microcontroller or Application Specific IntegratedCircuit, ASIC, or any other device that is programmable by hardwareand/or software.

In some embodiments the method comprises sorting the text items of apredefined set according to the sort key to arrange them in thepredefined order and provide a predefined number thereof for displayingin a sorted order.

In an embodiment this step is performed by the peripheral device somepoint in time subsequent to the pre-processing step e.g. during countrydependent configuration of the peripheral device. Since the sort keywith values indicating the sort order of the text items is appended whenthey are stored in the peripheral device, the peripheral device canaccess its memory and run the relatively simple sort algorithm with itsrelatively limited computational power to present the text items in theorder defined by the relatively complex sort algorithm. The text itemscan thus be stored in some order that saves memory consumption of theentire collection of text items. This order may be different from thesort order. Meanwhile the text items can be presented by the peripheraldevice in a sorted order according to e.g. a selected language orlocation.

In some embodiments the method comprises displaying a predefined numberof the text items from the selected set of text items for a user toselect a text item there from; and deciding which text item that wasselected and looking up the code item assigned to the group.

In some embodiments the man-machine-interface of the peripheral deviceis relatively limited and the display thereof may offer only a few linesof text display. It is therefore advantageous to display only apredefined number of text items out of all the text items in a selectedset at a time. Other text items can then be displayed by a scroll andselect technique known in the art. With such a technique a user canselect a text item which relates to a code item that in turn can be readby the peripheral device to make it operate according to a propertygiven by the code item.

In an embodiment the sort key is ignored by the display means such thatthe text items are displayed, but the values of the sort key is notgiven any graphical rendering by the display. Alternatively, the sortkey can be removed before the text items are displayed. Stillalternatively, the values of the sort key are given the same graphicalrendering and/or a rendering by a symbol which is a class of charactersdifferent from the characters of the text items; it may also be renderedas a ‘space’ or any other character.

In some embodiments the method comprises selecting at least one of thesets of text items in response to a user selection.

In an embodiment this step is performed during configuration of theperipheral device e.g. to provide text items in a language the user canread and understand. Configuration of the peripheral device can takeplace the first time it is put into operation or when initiated througha user interface. The user may then be provided with the option ofselecting a language. Alternatively, configuration may take place as astep of manufacturing the device where a language is selected tocorrespond with the device' shipping destination.

In some embodiments the sort key is appended to the text items as aleading or trailing character to constitute a text item that comprisescharacters within the Private Use Range and in the range not comprisedby the Private Use range.

Thereby, when the sort key is appended as a leading and/or trailingcharacter, a simple and easy way to access the sort key is provided.Since in many cases the display means does not render the characterswithin the Private Use Range, display of the text in the text items isnot distorted. Otherwise it is a simple operation to discard theappended trailing or leading characters before displaying.

In some embodiments the text items are arranged in a table structurewith columns, rows and cells, wherein a set is arranged in a column ofthe table, a group is arranged in a row and the cells of the tablecomprise the text items.

In some embodiments the table is stored in a binary file or other memorymeans for random access memory storage. As mentioned above the sort keymay be appended to the text items in the table as a leading or trailingcharacter.

In some embodiments the table, which is a first table, is stored in adata memory which is a section of memory where data are stored mainlyfor read operations. The table may comprise a group key that relates agroup of text items to a related code item which is stored in a secondtable. The second table may then be stored in a programme memory wherethe programme executing the method is stored. Consequently, the firsttable can be updated and/or loaded into memory without altering thecontent of the second table and the programme. This is expedient tosecure a reliable way of maintaining the programme and the memory of theperipheral device.

In some embodiments the multiple collections of text items comprisecountry names in a respective language, wherein a group comprises thename of a country in different languages and wherein a set comprisesnames of multiple countries, in one language.

This configuration is expedient for a configuration procedure thatrequires a national set-up e.g. in connection with use of automatic orsemi-automatic dial-in procedures or text message exchanges over publictelephone connections to/with servers.

In some embodiments the method comprises the following steps ofproviding the collection of multiple text items: loading into aprogramme running on a computer a list of text items; sorting the listalphabetically using the programme and receiving from the programme asorted list with the text items in alphabetic order; appending the sortkey to the text items in the sorted list in a way to designate thealphabetic order; and providing the sorted list with the sort key forstoring as a set of the collection of text items in the memory of theperipheral device.

These steps can take place during manufacture of the peripheral device.Consequently, the peripheral device does not need processing resourcesto run a sorting algorithm that takes national sorting rules intoaccount. The computer may be a general purpose computer running theMicrosoft Windows™ operating system or any other operating system.

In some embodiments multiple lists of names of countries are loaded intothe programme in order to sort each list alphabetically. The sort key isstored with the text items such that the alphabetic order of the textitems of each set can be revealed e.g. by appending the sort key as aleading or trailing character of each text item and assigning sort keyvalues in increasing or decreasing order.

There is also provided a device comprising: a memory having storedtherein a collection of multiple text items arranged in multiple sets oftext items and in multiple groups of text items; and for a respectivegroup of text items, a respective code item. Wherein the memory stores asort key that has values that designate a predefined order of the textitems in each set; and wherein the sort key is appended to the textitems and comprises at least one character with a value within thePrivate Use range of the Unicode format.

BRIEF DESCRIPTION OF THE FIGURES

FIG. 1 shows a flowchart for a method of appending a sort key accordingto the Private Use range of the Unicode format;

FIG. 2 shows a block diagram of a peripheral device; and

FIG. 3 shows a flowchart for a method run by the peripheral device.

DETAILED DESCRIPTION

FIG. 1 shows a flowchart for a method of appending a sort key accordingto the Private Use range of the Unicode format. The method is executedby a computer and comprises a first step 101 of running a sortingprocedure. The input to the sorting procedure is multiple lists of textitems forming a collection of text items. The lists of text items aresorted individually and in some embodiments according to differentsorting rules. The objective of running the sorting procedure is to beable to apply a sort key to each text item that indicates the sortedorder of the text items within each list. The sort key is applied instep 102. The sort key is appended to the text items e.g. as a leadingor trailing character and comprises at least one character with a valuewithin the Private Use range of the Unicode format.

Subsequently, in step 103, the collection of text items with their sortkey is stored in the memory of a peripheral device. In some embodimentsthese steps are performed by equipment for manufacturing a peripheraldevice and takes place during manufacture of the peripheral device.

In table 1 below, is shown a data structure for storing text itemsaccording to the Unicode format, which is used by most, if not all,conventional computer systems.

The sort key is represented by the square-shaped symbol ‘□’ andrepresents one or more characters according to the Private Use range ofthe Unicode format, whereas the capital letters A-Z and letters a-zrepresents characters according to the non-private range of the Unicodeformat. In an embodiment table 1 or a similar data structure is storedin the memory of a peripheral device e.g. in a data memory thereof.

TABLE 1 English Danish AU □Australia □Australien AT □Austria □Østrig CN□China □Kina . . . . . . . . .

In this case the text items represent country names, but could as wellrepresent other text items. The text items are arranged in multiple setsof text items and in multiple groups of text items, where the second andthird column comprises a first set and a second set, respectively. Thesecond, third, fourth and succeeding rows comprises a first, second,third group of text items. Thus various country names stated in e.g. theEnglish language are comprised in a set of text items and a country namestated in various languages is comprised by a group of text items.

The text items in the second column are arranged in alphabetic order asdefined by at least some English speaking countries. These text itemsare related to a group key which is stated e.g. as AU for Australia. Inorder not to store this group key in a redundant way the text items ofe.g. the third and succeeding columns are stored in an order differentfrom the alphabetic order. However, the alphabetic order is representedby the value of the sort key. Applying the Danish alphabetic order, thevalue of the sort key could be ‘1’ for Australia, ‘2’ for China and ‘3’for Austria. Therefore, the sorting procedure run in step 101 is run forthe purpose of appending a sort key value which indicates a desiredorder. This order is not necessarily the order in which the text itemsare stored as shown in table 1.

Table 2 below shows as an example the text items for the language option‘Danish’ in sorted order as they may appear in a display of a devicesuch as a base station for a headset. The text items are sortedaccording to the value of the sort key. The text items are relativelyeasy to sort since the sorting is based on the sort key which ispre-appended. Since this order correspond to the alphabetic order asdefined for Danish language it is intuitive for a person knowing theDanish language to browse and select a particular country or any othertext item in Danish or any other predefined language. Especially, whenthe list comprises more than three text items it greatly improves theman-machine-interface of a device when text items can be found in e.g.alphabetic order. Also, when the list is comprises three or more textitems e.g. 10 text items and only a subset e.g. 3 or 5 and thereby notall text items are available for display at the same time it greatlyimproves the man-machine-interface

TABLE 2 □Australien □Kina □Østrig

Table 3 below shows a data structure which may be embedded in aprogramme and stored in a programme memory. The leftmost column servesas the group key to relate rows of table 3 to rows in table 1, whereinthe leftmost column serves as a key for that relation. The rightmostcolumn and any further columns can comprise a code item which isselected via a selection of a text item made by a user from a selectedcolumn of table 1. Thus, if a user selects Danish as a desired languagethe country names listed in the rightmost column of table 1 isdisplayed. A selection of e.g. ‘Kina’ makes it possible to firstlyretrieve the key value ‘CN’ and then with that value looking up table 3in the programme memory to get the code item ‘+86’ which is used as aproperty in the programme run by the peripheral device.

TABLE 3 AU +64 AT +43 CN +86

In some embodiments the code item comprises multiple code items and/orreferences to other code items. The code item may represent a pre-dialnumber for selecting a country or region when making a telephone call.Additionally or alternatively, the code item may comprise a completetelephone number.

In some embodiments other data structures tables are used for storingthe text items and the code items. As an alternative to two tables, oneor three and more tables can be used. Nested lists may be such analternative data structure.

The Private Use Area of the Unicode standard comprises values in thehexadecimal range U+E000 to U+F8FF. This range of values is availablefor the text items within a single set of text items and can be reusedfor each set. Appending two or more characters expands the number oftext items that can be assigned a unique sort key value and thus thenumber of text items that can be handled in a sorted way.

FIG. 2 shows a block diagram of a peripheral device. The peripheraldevice 206 is connected to a computer 205 which may be a general purposeor personal computer or another type of computer loaded with a programmeto store a data structure as mentioned above in the memory of theperipheral device 206 during manufacture of the device. During normaloperation of the device it is also connected to a personal computer oranother type of computer e.g. via a USB connection.

The peripheral device comprises a microprocessor 202 with a programmememory 203 and a data memory 204. The data memory stores the text itemse.g. as mentioned in connection with table 1 and the programme memorystores the code items e.g. as mentioned in connection with table 2.Additionally, the peripheral device comprises a man-machine-interface201 with a display (not shown) and buttons (not shown) for displaying apredefined number of the text items e.g. on 3 or 5 lines at a time andfor providing a user with the option of selecting one of the text itemswhich in turn enables a programme run by the microprocessor 202 to reeda code item related to the text item and continue programme executionwith the read code item. In some embodiments, the continued programmeexecution may involve invoking or calling or communicating with aprogramme running on the computer 205.

FIG. 3 shows a flowchart for a method run by the peripheral device. In afirst step 301 of the method, a set of text items is selected. Asmentioned above, selecting a set of text items can be selecting alanguage in which it is preferred to have various country names listed.In a following step, 302, the selected set of text items are retrievede.g. from a data structure as illustrated by table 1. At this stage ofexecuting the method, the sort key is available and indicates by itsvalue for each text item the order in which they are to be displayed orotherwise presented. It is thus a computationally feasible task for thedevice to sort the text items using the sort key in step 303. Forinstance if, as illustrated by table 1, the Danish language is selectedthe storage order does not correspond to the order in which they are tobe displayed and sorting is necessary.

By means of a man-machine-interface a user is provided, in step 304,with the option of selecting a country e.g. from the list exemplified bytable 2 and it is determined which text item and thus country the userhas selected. Subsequently, in step 305, the determined text item isused to look up a matching text item, in the selected language, in atable structure as illustrated by table 1 to identify a respective groupkey value. Thus, looking up the text item can be confined to a singlecolumn of the table. Then, in step 306, a group key value matching theone found in table 1 is looked up in table 3 and a respective code itemcan be read.

In step 307 continued programme execution with the read code item iscarried out. In this way it is possible to provide an improved userinterface which demands only limited processing resources.

Generally, the term ‘computer-implemented method’ is used to designatethat the method runs on any type of processor such as a microcontrolleror microprocessor or other type of integrated circuit.

1. A computer-implemented method of arranging text items in a predefinedorder, comprising: storing, in the memory of a peripheral device, acollection of multiple text items arranged in multiple sets of textitems and in multiple groups of text items; and storing a respectivecode item with a respective group of text items; storing a sort key thathas values that designate a predefined order of the text items in eachset; wherein the sort key is appended to the text items and comprises atleast one character with a value within the Private Use range of theUnicode format.
 2. A computer-implemented method according to claim 1,comprising: sorting the text items of a predefined set according to thesort key to arrange them in the predefined order and provide apredefined number thereof for displaying in a sorted order.
 3. Acomputer-implemented method according to claim 1, comprising: displayinga predefined number of the text items from the selected set of textitems for a user to select a text item there from; deciding which textitem that was selected and looking up the code item assigned to thegroup.
 4. A computer-implemented method according to claim 1,comprising: selecting at least one of the sets of text items in responseto a user selection.
 5. A computer-implemented method according to claim1, wherein the sort key is appended to the text items as a leading ortrailing character to constitute a text item that comprises characterswithin the Private Use Range and in the range not comprised by thePrivate Use range.
 6. A computer-implemented method according to claim1, wherein the text items are arranged in a table structure withcolumns, rows and cells, wherein a set is arranged in a column of thetable, a group is arranged in a row and the cells of the table comprisesthe text items.
 7. A computer-implemented method according to claim 1,wherein the multiple collections of text items comprises country namesin a respective language, wherein a group comprises the name of acountry in different languages and wherein a set comprises names ofmultiple countries, in one language.
 8. A computer-implemented methodaccording to claim 1, comprising the following steps of providing thecollection of multiple text items: loading into a program running on acomputer a list of text items; sorting the list alphabetically using theprogram and receiving from the program a sorted list with the text itemsin alphabetic order; appending the sort key to the text items in thesorted list in a way to designate the alphabetic order; and providingthe sorted list with the sort key for storing as a set of the collectionof text items in the memory of the peripheral device.
 9. A peripheraldevice comprising: a memory having stored therein a collection ofmultiple text items arranged in multiple sets of text items and inmultiple groups of text items; and for a respective group of text items,a respective code item; the memory stores a sort key that has valuesthat designate a predefined order of the text items in each set; whereinthe sort key is appended to the text items and comprises at least onecharacter with a value within the Private Use range of the Unicodeformat.
 10. A device according to claim 9, comprising a controllerconfigured to: display a predefined number of the text items from theselected set of text items for a user to select a text item there from;and decide which text item that was selected and looking up the codeitem assigned to the group.
 11. A device according to claim 9,comprising a controller configured to: select at least one of the setsof text items in response to a user selection.
 12. A device according toclaim 9, wherein the sort key is appended to the text items as a leadingor trailing character to constitute a text item that comprisescharacters within the Private Use Range and in the range not comprisedby the Private Use range.
 13. A device according to claim 9, wherein thetext items are arranged in a table structure with columns, rows andcells, wherein a set is arranged in a column of the table, a group isarranged in a row and the cells of the table comprises the text items.14. A device according to claim 9, wherein the multiple collections oftext items comprises country names in a respective language, wherein agroup comprises the name of a country in different languages and whereina set comprises names of multiple countries, in one language.